{% macro show(url, message) %}
<a href="{{ url }}" class="btn btn-default">
   <i class="glyphicon glyphicon-book"></i><span>{{ message is empty ? '显示': message }}</span>
</a>
{% endmacro %}

{% macro generic(url, message, icon) %}
<a href="{{ url }}" class="btn btn-default">
    {% if icon is not empty %}<i class="glyphicon glyphicon-{{ icon }}"></i>{% endif %}<span>{{ message }}</span>
</a>
{% endmacro %}

{% macro create(url, message) %}
<a href="{{ url }}" class="btn btn-primary">
    <i class="glyphicon glyphicon-plus-sign"></i><span>{{ message is empty ? '创建': message }}</span>
</a>
{% endmacro %}

{% macro edit(url, message) %}
<a href="{{ url }}" class="btn btn-primary">
    <i class="glyphicon glyphicon-pencil"></i><span>{{ message is empty ? '修改': message }}</span>
</a>
{% endmacro %}

{% macro delete(url, message) %}
<form action="{{ url }}" method="post" class="delete-action-form" novalidate>
    <input type="hidden" name="_method" value="DELETE">
    <button class="btn btn-danger" type="submit">
        <i class="glyphicon glyphicon-trash"></i> <span>{{ message is empty ? '删除' : message }}</span>
    </button>
</form>
{% endmacro %}

{% macro manage(url, message) %}
<a href="{{ url }}" class="btn btn-success">
    <i class="glyphicon glyphicon-folder-open"></i><span>{{ message is empty ? '管理': message }}</span>
</a>
{% endmacro %}

{% macro disable(url, message) %}
    <a href="{{ url }}" class="btn btn-default">
        <i class="glyphicon glyphicon-eye-close"></i><span>{{ message is empty ? '禁用': message }}</span>
    </a>
{% endmacro %}

{% macro enable(url, message) %}
    <a href="{{ url }}" class="btn btn-default">
        <i class="glyphicon glyphicon-eye-open"></i><span>{{ message is empty ? '启用': message }}</span>
    </a>
{% endmacro %}

